<template>
	<view class="Header">
		<view class="titile">
			<view class="TitLeft">
				<view class="iconfont icon-toutiao Headline"></view>
				<view class="iconfont icon-yuyinzuo voice"></view>
			</view>
			<view class="TitCenter">
				<view class="Account">关于我行对符合条条件的账户</view>
			</view>
			<view class="TitRight">
				<view class="iconfont icon-hongdian RedView"></view>
				<view class="Again">更多</view>
				<view class="iconfont icon-right-1-copy RView"></view>
			</view>
		</view>
		<view class="Img">
			<view class="Img_image">
				<swiper class="swiper" indicator-color="white" indicator-active-color="pink" circular
					:indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
					<swiper-item v-for="(item,index) in advertisementData" :key="index">
						<view class="swiper-item uni-bg-red" >
							<image :src="ImageUrl+item.picture" class="Img_images" mode=""></image>
						</view>
					</swiper-item>
				</swiper>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		advertisement
	} from "../../apis/index.js"
	import {IMAGE_BASE_URL} from "../../config/index.js"
	export default {
		data() {
			return {
				ImageUrl : IMAGE_BASE_URL,
				background: ['color1', 'color2', 'color3'],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500,
				query: {
					typeid: 1,
					page: 1,
					psize: 5
				},
				advertisementData: []
			}
		},
		created() {
			this.getadvertisement()
		},
		methods: {
			async getadvertisement() {
				let res = await advertisement(this.query)
				console.log("轮播", res);
				this.advertisementData = res.list
			}
		}
	}
</script>

<style lang="less">
	.Header {
		padding: 0 32rpx;
	}

	.titile {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-left: 5rpx;
		// padding-top: 50r;
		margin-top: 33rpx;

		.TitLeft {
			display: flex;

			.Headline {
				width: 63rpx;
				height: 32rpx;
				color: #56a6fc;
				font-weight: 600;
			}

			.voice {
				color: #ffbf37;
				font-size: 27rpx;
			}
		}

		.TitCenter {
			.Account {
				width: 450rpx;
				font-size: 30rpx;
				/* 超出部分隐藏 */
				overflow: hidden;
				/* 显示省略号 */
				text-overflow: ellipsis;
				white-space: nowrap;
				// margin-left: 10rpx;
			}
		}

		.TitRight {
			display: flex;
			justify-content: center;
			align-items: center;

			.RedView {
				font-size: 25rpx;
				font-weight: bold;
				color: red;
			}

			.Again {
				font-size: 20rpx;
				flex-direction: column;
			}

			.RView {
				font-size: 23rpx;
				// padding-right: 25rpx;
			}
		}
	}

	.Img {
		.Img_image {
			width: 100%;
			height: 250rpx;

			// margin: 35rpx 1rpx;
			// margin-right: 35rpx;
			.Img_images {
				width: 100%;
				height: 300rpx;

			}
		}
	}

	.swiper {
		margin-top: 30rpx;
	}

	.swiper-box {
		height: 200px;
	}

	.uni-margin-wrap {
		width: 690rpx;
		width: 100%;
	}

	.swiper {
		height: 300rpx;
	}

	.swiper-item {
		width: 100%;
		display: block;
		height: 300rpx;
		line-height: 300rpx;
		text-align: center;
	}

	.swiper-list {
		margin-top: 40rpx;
		margin-bottom: 0;
	}

	.uni-common-mt {
		margin-top: 60rpx;
		position: relative;
	}

	.info {
		position: absolute;
		right: 20rpx;
	}

	.uni-padding-wrap {
		width: 550rpx;
		padding: 0 100rpx;
	}
</style>